In certain computing applications, it is desirable to separately maintain a data file and changes to the data file instead of writing the changes directly to the data file. For example, one might want to have the ability to “undo” the changes and return to the original data file. Alternatively, there might be a desire to make multiple independent changes to an initial file, without having to copy the initial file for each independent change.
In the field of computer virtualization, and particularly desktop virtualization, delta disks, also referred to as “redo logs” “diff files” etc., may be used to customize a base disk image for a virtual disk. A discussion of the use of such delta disks for virtual computer systems is provided in U.S. Pat. No. 7,356,679, entitled “Computer Image Capture, Customization and Deployment,” which issued on Apr. 8, 2008. Each delta disk contains changes to the base disk image to provide customization and data retention for each user. The combination of base and delta disks make up a virtual disk hierarchy virtualized by virtualization software so that it appears to each user (or virtual machine) as a single physical disk. Each virtual disk may be organized in a manner similar to conventional physical disks, i.e., into discrete addressable disk blocks. When the virtual disk is read, first the delta disk is accessed to determine if the portion of the virtual disk being accessed is contained within the delta disk. For example, if a particular disk block of the virtual disk includes modifications since creation of the delta disk, then that disk block will be present in the delta disk. If the disk block is not present in the delta disk, then the corresponding disk block is accessed in the base image, from which the requested information is retrieved. Writes to the virtual disk are directed to the delta disk. If the write is directed to a previously modified disk block present in the delta disk, then the previously modified disk block is overwritten, otherwise the delta disk is augmented to include the newly modified disk block.
In some cases, it may be desirable to have one or more chains of delta disks from a single base. In an enterprise environment, for example, there may be a base disk image for a company containing the operating system and installed software usable by each employee, such as an email client. Then from this base disk image, a plurality of departmental delta disks include software suitable for each department. Accounting software for the accounting department, computer-aided design software for the engineering department, etc. Then from each of these departmental deltas, individual deltas may be maintained by individual users.
In ordinary use of computer disk images, the data storage requirements increase over time, making it necessary at some point to move one or more disks images from one datastore to another. In the field of virtualization, sometimes it is necessary to migrate a virtual machine from one datastore to another, e.g., for load-balancing, or to take a physical computer out of service. However, where a virtual disk is made up of a base disk image and one or more deltas, each of the parent delta images and base image must be copied along with the delta, or else some logical connection must be maintained across data stores, which in some cases is not possible.